import 'dart:async';

import 'package:flutter/services.dart';

class SecurityUtil {
  static const _platform = const MethodChannel('com.thalys.flutter.plugins/aes');
  final EventChannel eventChannel =
  const EventChannel('plugins.flutter.io/charging');
  ///加密字符串
  static Future<String> encrypt(String targetStr) async {
    String str=await _platform.invokeMethod('encrypt', { 'targetStr': targetStr});
    return str;
  }


  ///解密字符串
  static Future<String> decrypt(String targetStr) async{
    String  str=await _platform.invokeMethod('decrypt', { 'targetStr': targetStr});
    return str;
  }



  ///签名
  static Future<String> doSign(String targetStr) async{
    String  str=await _platform.invokeMethod('sign', { 'targetStr': targetStr});
    return str;
  }
}
